var topindex ={
		submit :function(){
			var l = document.getElementsByName("index").length;
			var ids = "";
			var tops= "";
			for(var i=0;i<l;i++){
				ids = ids+document.getElementsByName("index")[i].id+",";
				tops = tops +document.getElementsByName("index")[i].value+",";
			}
			ids = ids.substring(0, ids.length-1);
			tops = tops.substring(0, tops.length-1);
//			var startTime ="";
//			if($("#startTime").val().length>0){
//				for(var i=0;i<$("#startTime").val().length;i++){
//					
//					startTime = startTime +$("#startTime").val()[i]+",";
//				}
//				startTime = startTime.substring(0, startTime.length-1);
//				test.startTime=startTime;
//			}else{
//				
//				alert("请选择开始时间！");
//			}
			$.ajax({  
				"dataType" : 'json',  
				"data":{
					"ids":ids,
					"tops":tops
					
				},
				
				"type" : "POST",  
				"url" : "admin/event/commitIndex.json",
				"success" : function(data){
					alert("排序成功！");
				},
				"error":function(){
					$("#showbox").html("系统异常，稍后再试！");
					$("#showdiv").removeClass("alert alert-success margin-bottom-10");
					$("#showdiv").addClass("Metronic-alerts alert alert-danger fade in");
					$("#showdiv").show();
				}
			}); 
		}
		
}
var test ={};

$(document).ready(function() {
});
